using Microsoft.Practices.EnterpriseLibrary.Security.Cryptography;
using Web.App.Infrastructure.Security.Contracts;

namespace Web.App.Infrastructure.Security
{
    public class EncryptionService : IEncryptionService
    {
        private const string provider = "EncryptionProvider";

        public string EncryptString(string plainText)
        {
            return Cryptographer.EncryptSymmetric(provider, plainText);
        }

        public string DecryptString(string encryptedText)
        {
            return Cryptographer.DecryptSymmetric(provider, encryptedText);
        }
    }
}